reverse_tunnel: add drain-aware HCM for hot restart with reverse tunnels#43970
Draft
basundhara-c wants to merge 3 commits intoenvoyproxy:mainfrom
Draft
reverse_tunnel: add drain-aware HCM for hot restart with reverse tunnels#43970basundhara-c wants to merge 3 commits intoenvoyproxy:mainfrom
basundhara-c wants to merge 3 commits intoenvoyproxy:mainfrom
Conversation
Signed-off-by: Basundhara Chakrabarty <basundhara17061996@gmail.com>
Contributor
Author
|
/coverage |
|
Coverage for this Pull Request will be rendered here: https://storage.googleapis.com/envoy-cncf-pr/43970/coverage/index.html For comparison, current coverage on https://storage.googleapis.com/envoy-cncf-postsubmit/main/coverage/index.html The coverage results are (re-)rendered each time the CI |
Signed-off-by: Basundhara Chakrabarty <basundhara17061996@gmail.com>
Signed-off-by: Basundhara Chakrabarty <basundhara17061996@gmail.com>
b1b89e3 to
5a95740
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Commit Message: add optional drain-aware HCM for hot restart with reverse tunnels
Additional Description:
Problem:
During hot restart of the initiator envoy, the HCM drain path only sends
HTTP/2 GOAWAY frames reactively — when a request arrives on a draining
connection. On idle reverse-tunnel connections (no in-flight requests),
GOAWAY is never sent because nothing triggers the drain sequence).
This means the responder envoy has no signal that the initiator is
draining. Services behind the responder may continue dispatching requests
over stale parent connections to the draining initiator. If a request
arrives just before parent shutdown, it fails and may not be safely
retryable (e.g., it already reached the upstream service). With multiple
parent connections on the same responder, each one requires a separate
request to trigger draining individually.
Solution:
Extend the HCM by introducing an optional extension called
drain_aware_http_connection_managerunder the reverse_tunnel namespace.This wraps the standard HCM and overrides the drain logic: when the
listener begins draining, a
DrainAwareServerConnectionwrapper detectsdrain via polling
DrainDecision::drainClose()and proactively sends anHTTP/2 GOAWAY frame on active connections. This approach avoids any
changes to core HCM/drain code — all logic lives in the reverse tunnel
extension.
Risk Level: Low
Testing: Tests added
Docs Changes: N.A
Release Notes: N.A
Platform Specific Features: